window.onload = function () {
  const topbar = document.querySelector('#topbar');
  const sections = document.querySelectorAll('section.info');
  sections.forEach((d) => {
    const title = d.firstElementChild.firstElementChild.innerText;
    const id = d.attributes.id.nodeValue;
    const item = document.createElement('a');
    item.innerText = title;
    item.href = '#'+id;
    topbar.appendChild(item);
  });
};
